Question: A unit cube has vertices $P_1,P_2,P_3,P_4,P_1',P_2',P_3',$ and $P_4'$. Vertices $P_2$, $P_3$, and $P_4$ are adjacent to $P_1$, and for $1\le i\le 4,$ vertices $P_i$ and $P_i'$ are opposite to each other. A regular octahedron has one vertex in each of the segments $\overline{P_1P_2}$, $\overline{P_1P_3}$, $\overline{P_1P_4}$, $\overline{P_1'P_2'}$, $\overline{P_1'P_3'}$, and $\overline{P_1'P_4'}$.  Find the side length of the octahedron.

[asy]
import three;

size(5cm);
triple eye = (-4, -8, 3);
currentprojection = perspective(eye);

triple[] P = {(1, -1, -1), (-1, -1, -1), (-1, 1, -1), (-1, -1, 1), (1, -1, -1)}; // P[0] = P[4] for convenience
triple[] Pp = {-P[0], -P[1], -P[2], -P[3], -P[4]};

// draw octahedron
triple pt(int k){ return (3*P[k] + P[1])/4; }
triple ptp(int k){ return (3*Pp[k] + Pp[1])/4; }
draw(pt(2)--pt(3)--pt(4)--cycle, gray(0.6));
draw(ptp(2)--pt(3)--ptp(4)--cycle, gray(0.6));
draw(ptp(2)--pt(4), gray(0.6));
draw(pt(2)--ptp(4), gray(0.6));
draw(pt(4)--ptp(3)--pt(2), gray(0.6) + linetype("4 4"));
draw(ptp(4)--ptp(3)--ptp(2), gray(0.6) + linetype("4 4"));

// draw cube
for(int i = 0; i < 4; ++i){
draw(P[1]--P[i]); draw(Pp[1]--Pp[i]);
for(int j = 0; j < 4; ++j){
if(i == 1 || j == 1 || i == j) continue;
draw(P[i]--Pp[j]); draw(Pp[i]--P[j]);
}
dot(P[i]); dot(Pp[i]);
dot(pt(i)); dot(ptp(i));
}

label("$P_1$", P[1], dir(P[1]));
label("$P_2$", P[2], dir(P[2]));
label("$P_3$", P[3], dir(-45));
label("$P_4$", P[4], dir(P[4]));
label("$P'_1$", Pp[1], dir(Pp[1]));
label("$P'_2$", Pp[2], dir(Pp[2]));
label("$P'_3$", Pp[3], dir(-100));
label("$P'_4$", Pp[4], dir(Pp[4]));
[/asy]
Answer: Place the cube in coordinate space so that $P_1 = (0,0,0)$ and $P_1' = (1,1,1),$ and the edges of the cube are parallel to the axes.  Since all the side lengths of the octahedron are equal, the vertices on $\overline{P_1 P_2},$ $\overline{P_1 P_3},$ and $\overline{P_1 P_4}$ must be equidistant from $P_1.$  Let this distance be $x,$ so one vertex is at $(x,0,0).$  Also, this makes the side length of the octahedron $x \sqrt{2}.$

Similarly, the other three vertices have a distance of $x$ from $P_1',$ so one of them is at $(1,1 - x,1).$

[asy]
size(7.5cm);
import three;
currentprojection=orthographic(0.3,-1,0.3);
dot((3/4,0,0)); dot((0,0,3/4)); dot((0,3/4,0));
dot((1,1,1/4)); dot((1,1/4,1)); dot((1/4,1,1));
draw((3/4,0,0)--(0,3/4,0)--(1/4,1,1)--(1,1/4,1)--cycle,red);
draw((0,0,0)--(1,0,0)--(1,1,0)--(0,1,0)--cycle);
draw((0,0,0)--(0,0,1));
draw((0,1,0)--(0,1,1));
draw((1,1,0)--(1,1,1));
draw((1,0,0)--(1,0,1));
draw((0,0,1)--(1,0,1)--(1,1,1)--(0,1,1)--cycle);
label("$(0,0,0)$",(0,0,0),SW,fontsize(10pt));
label("$(1,1,1)$",(1,1,1),NE,fontsize(10pt));
label("$(x,0,0)$",(3/4,0,0),S,fontsize(9pt));
label("$(1,0,0)$",(1,0,0),ESE,fontsize(10pt));
label("$(0,0,1)$",(0,0,1),W,fontsize(10pt));
label("$(0,1,1)$",(0,1,1),N,fontsize(10pt));
label("$(1,1,0)$",(1,1,0),E,fontsize(10pt));
label("$(0,1,0)$",(0,1,0),NE,fontsize(10pt));
label("$(1,1 - x,1)$", (1,1/4,1),SE,fontsize(10pt));
[/asy]

Hence,
\[(1 - x)^2 + (1 - x)^2 + 1 = 2x^2.\]Solving, we find $x = \frac{3}{4}.$  Therefore, the side length of the octahedron is $\boxed{\frac{3 \sqrt{2}}{4}}.$